from celery import Celery
import os,django


os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lyapi.settings.dev')
django.setup()
app = Celery('lyapi')
app.config_from_object('mycelery.config')
app.autodiscover_tasks(['mycelery.sms', 'mycelery.email', 'mycelery.check_order'])

# 注意：运行celery启动指令时，要在mycelery外层来执行。